<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta charset="utf-8">
  <title><?=$title ?></title>
  <meta name="description" content="<?=$description ?>">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,700,700italic,800,800italic&subset=latin,cyrillic-ext' rel='stylesheet' type='text/css'>

  <!-- Stylesheets -->
  <link href="/media/style/bootstrap.css" rel="stylesheet">
  <!-- Pretty Photo -->
  <link href="/media/style/prettyPhoto.css" rel="stylesheet">
  <!-- Sidebar nav -->
  <link href="/media/style/sidebar-nav.css" rel="stylesheet">
  <!-- Flex slider -->
  <link href="/media/style/flexslider.css" rel="stylesheet">
  <!-- Font awesome icon -->
  <link rel="stylesheet" href="/media/style/font-awesome.css"> 
  <!-- Main stylesheet -->
  <link href="/media/style/style.css" rel="stylesheet">
  <!-- Stylesheet for Color -->
  <link href="/media/style/red.css" rel="stylesheet">
  <!-- Responsive style (from Bootstrap) -->
  <link href="/media/style/bootstrap-responsive.css" rel="stylesheet">
  <!-- Social Likes -->
  <link href="/media/style/social-likes.css" rel="stylesheet">
  
  <script src="/media/js/jquery.js"></script> <!-- jQuery -->
  <script src="/media/js/bootstrap.js"></script> <!-- Bootstrap -->
  <script src="/media/js/jquery.prettyPhoto.js"></script> <!-- Pretty Photo -->
  <script src="/media/js/filter.js"></script> <!-- Filter for support page -->
  <script src="/media/js/jquery.tweet.js"></script> <!-- Twitter -->
  <script src="/media/js/jquery.flexslider-min.js"></script> <!-- Flex slider -->
  <script src="/media/js/jquery.unveil.js"></script> <!-- Image lazy loading -->
  <script src="/media/js/nav.js"></script> <!-- Sidebar navigation -->
  <script src="/media/js/custom.js"></script> <!-- Custom codes -->
  
  <!-- HTML5 Support for IE -->
  <!--[if lt IE 9]>
  <script src="/media/js/html5shim.js"></script>
  <![endif]-->
  <?php /*
  <!-- Favicon -->
  <link rel="shortcut icon" href="/media/img/favicon/favicon.ico">       */ ?>
</head>

<body itemscope itemtype="http://schema.org/WebPage">

  <!-- Header starts -->
  <header>
    <div class="container">
      <div class="row">

        <div class="span4">
          <div class="logo">
            <h2><span class="hlink" hlink="/">Style<span class="color bold">May</span></span></h2>
            <p class="meta">Вся одежда и обувь по скидкам!</p>
          </div>
        </div>

        <div class="span5 offset3">
          <form method="post" class="form-search" onsubmit="var query = $(this).find('input[type = text]').val(); var url = '/search/' + query; document.location = encodeURI(url); return false;">
            <div class="input-append">
              <input class="span3" type="text" <?php if ($search_query): ?>value="<?=$search_query ?>"<?php else: ?>placeholder="Введите что-нибудь..."<?php endif; ?>>
              <button class="btn" type="submit">Искать</button>
            </div>
          </form> 

        </div>

      </div>
    </div>
  </header>
  <!-- Header ends -->

  <?=Helper_Index::top_menu(); ?>  

<?php if ($page_head): ?>
<!-- Page heading starts -->
<div class="page-head">
  <div class="container">
    <div class="row">
      <div class="span12">
        <h1><?=$page_head ?></h1>
      </div>
    </div>
  </div>
</div>
<?php endif; ?>

<!-- Items -->
<div class="items">
  <div class="container">
    <div class="row">
                                                          
       <?=$content ?> 

    </div>
  </div>
</div>

<?php /*  
$show = true;
$session = Session::instance();
if ($show_count = $session->get('viewed-coupons-modal')) {
    if ($show_count && $show_count > 1) {
        $show = false;   
    }
}
if ($show):
$coupons = ORM::factory('coupon')->get_popular_coupons();
if (count($coupons)): ?>
<div id="coupons-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="coupons-modal-label" aria-hidden="true">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		<h3 id="coupons-modal-label">Лучшие скидки на одежду</h3>
	</div>
	<div class="modal-body">
		<table class="table table-hover tcart">
            <tbody>
                <?php foreach ($coupons as $coupon): ?>
                <tr>
                    <td><span class="hlink" hlink="<?=Helper_Index::go_coupon_url($coupon) ?>" target="_blank"><img src="<?=$coupon->logo ?>" /></span></td>
                    <td><span class="hlink" hlink="<?=Helper_Index::go_coupon_url($coupon) ?>" target="_blank"><?=$coupon->name ?></span></td>
                </tr>  			
                <?php endforeach; ?>
            </tbody>
        </table>
	</div>

</div>
<script type="text/javascript">
	setTimeout("$('#coupons-modal').modal()", 5000);
</script>
<?php
if ($show_count) {
    $show_count++;    
} else {
    $show_count = 1;
}
$session->set('viewed-coupons-modal', $show_count);
endif;
endif; */ ?> 


<?php /*<div id="subscribe-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="subscribe-modal-label" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="subscribe-modal-label">Получите скидку!</h3>
    </div>
    <div class="modal-body">
        <div class="subscribe-form-part">
            <p>
                <strong>Введите свое имя и email</strong>, чтобы получить скидку <span id="discount-value"></span> на этот товар. 
            </p>
            <form action="https://madmimi.com/signups/subscribe/99285" id="mad_mimi_signup_form" class="form-horizontal" method="post" target="_blank">
               <div class="control-group required">
                  <label class="control-label" for="signup_name">Имя</label>
                  <div class="controls">
                    <input class="required" data-required-field="Обязательно для заполнения" id="signup_name" name="signup[name]" placeholder="Ваше имя" type="text"/>
                  </div>
               </div>
               <div class="control-group required">
                  <label class="control-label" for="signup_email">Email</label>
                  <div class="controls">
                    <input class="required" data-invalid-email="Некорректный email" data-required-field="Обязательно для заполнения" id="signup_email" name="signup[email]" placeholder="mail@mail.ru" type="text"/>
                  </div>
               </div>
               <div class="form-actions">
                  <input class="btn btn-primary" data-choose-list="&#8593; Выберите из списка" data-default-text="Отправить" data-invalid-text="&#8593; Вы не заполнили обязательные поля" data-submitting-text="Sending..." id="webform_submit_button" name="commit" type="submit" value="Отправить"/>
                  <a id="without-discount-url" class="pull-right" target="_blank" style="color: #666;" href="">Отказаться от скидки</a>
               </div>
            </form>
        </div>
        <div class="discount-part" style="display: none;">
            <p>Спасибо, воспользуйтесь вашей скидкой!</p><br />
            <a class="btn btn-success" target="_blank" href="">Воспользоваться скидкой!</a>    
        </div>
        <script type="text/javascript">
        (function() {
          var form = document.getElementById("mad_mimi_signup_form"),
              submit = document.getElementById("webform_submit_button"),
              validEmail = /.+@.+\..+/,
              isValid;
              
          form.onsubmit = function(event) {
            validate();
            if(!isValid) {
              revalidateOnChange();
              return false;
            }
            
            // если все ок, установка куки
            var date = new Date;
            date.setDate(date.getDate() + 30);
            setCookie('subscription_done', 1, {expires: date.toUTCString(), path: '/'}); 
            
            // редиректим на страницу со скидкой
            var url = $('#subscribe-modal .discount-part a').attr('href');
            window.open('http://stylemay.ru'+url, '_blank');
            $('#subscribe-modal .subscribe-form-part').hide();
            $('#subscribe-modal .discount-part').show();
          };
          
          function validate() {
            isValid = true;
            emailValidation();
            fieldsValidation();
            listsValidation();
            updateFormAfterValidation();
          }

          function emailValidation() {
            var email = document.getElementById("signup_email");
            if(!validEmail.test(email.value)) {
              errorMessage(email);
              isValid = false;
            } else {
              removeErrorMessage(email);
            }
          }

          function fieldsValidation() {
            for(var i = 0; i < form.elements.length; ++i) {
              var input = form.elements[i];
              if(input.id == "signup_email") continue;
              if(input.className.indexOf("required") >= 0) {
                if(input.value == "") {
                  errorMessage(input)
                  isValid = false;
                } else {
                  removeErrorMessage(input);
                }
              }
            }
          }

          function listsValidation() {
            var mainListsDiv = document.getElementById("signup_audience_lists");
            if(mainListsDiv && mainListsDiv.className.indexOf("required") >= 0) {
              var listSelected = false;
              for(var i = 0; i < form.elements.length; ++i) {
                var input = form.elements[i];
                if(input.type != "checkbox") continue;
                if(input.checked) listSelected = true;
              }
              if(!listSelected) {
                if(mainListsDiv.className.indexOf("invalid") == -1) mainListsDiv.className += " invalid";
                isValid = false;
              } else {
                mainListsDiv.className = mainListsDiv.className.replace(/ invalid/g, "");
              }
            }
          }

          function errorMessage(input) {
            input.className   = "required invalid";
            input.placeholder = input.getAttribute("data-required-field");
          }

          function removeErrorMessage(input) {
            input.className   = "required";
            input.placeholder = "";
          }

          function updateFormAfterValidation() {
            //form.className = isValid ? "" : "mimi_invalid";
            submit.value = submitButtonText();
            submit.disabled = !isValid;
            //submit.className = isValid ? "submit" : "disabled";
          }

          function submitButtonText() {
            var text;
            if(isValid) {
              text = submit.getAttribute("data-default-text");
            } else {
              var allFieldsValid = checkIfAllFieldsAreValid();
              if(allFieldsValid) {
                text = submit.getAttribute("data-choose-list");
              } else {
                text = submit.getAttribute("data-invalid-text");
              }
            }
            return text;
          }

          function checkIfAllFieldsAreValid() {
            var allFieldsValid = true
            for(var i = 0; i < form.elements.length; ++i) {
              var input = form.elements[i];
              if(input.placeholder && input.placeholder.length > 0) allFieldsValid = false;
            }
            return allFieldsValid;
          }

          function revalidateOnChange() {
            for(var i = 0; i < form.elements.length; ++i) {
              var input = form.elements[i];
              if(input.className.indexOf("required") >= 0 || input.type == "checkbox") {
                input.onchange = validate;
              }
            }
          }
        })();
        </script>    
    </div>

</div>       */ ?>

    



<?php /*
<!-- Recent items carousel starts -->

<div class="recent-posts">
  <div class="container">
    <div class="row">
      <div class="span12">
        <div class="bor"></div>
        <h4 class="title">Recent Items</h4>
        <div class="carousel_nav pull-right">
          <!-- Navigation -->
          <a class="prev" id="car_prev" href="#"><i class="icon-chevron-left"></i></a>
          <a class="next" id="car_next" href="#"><i class="icon-chevron-right"></i></a>
        </div>
        <div class="clearfix"></div>
        <ul class="rps-carousel">
            <!-- Recent items #1 -->
            <!-- Each item should be enclosed inside "li"  tag. -->
            <li>
                <div class="rp-item"> 
                  <div class="rp-image">    
                  <!-- Image -->    
                    <a href="single-item.html"><img src="img/photos/2.png" alt=""/></a>
                  </div>
                  <div class="rp-details">
                    <!-- Title and para -->
                    <h5><a href="single-item.html">HTC One V <span class="price pull-right">$225</span></a></h5>
                    <div class="clearfix"></div>
                    <!-- Description -->
                    <p>Travel far away to a space station.</p>         
                  </div>                
                </div>        
            </li>
            <!-- Recent items #2 -->
            <li>
                <div class="rp-item"> 
                  <div class="rp-image">        
                    <a href="single-item.html"><img src="img/photos/3.png" alt=""/></a>
                  </div>
                  <div class="rp-details">
                    <!-- Title and para -->
                    <h5><a href="single-item.html">Sony Xperia Pro <span class="price pull-right">$525</span></a></h5>
                    <div class="clearfix"></div>
                    <p>Travel far away to a space station.</p>         
                  </div>                
                </div>        
            </li>
            <li>
                <div class="rp-item"> 
                  <div class="rp-image">        
                    <a href="single-item.html"><img src="img/photos/4.png" alt=""/></a>
                  </div>
                  <div class="rp-details">
                    <!-- Title and para -->
                    <h5><a href="single-item.html">Samsung Pop <span class="price pull-right">$255</span></a></h5>
                    <div class="clearfix"></div>
                    <p>Travel far away to a space station.</p>         
                  </div>                
                </div>        
            </li>
            <li>
                <div class="rp-item"> 
                  <div class="rp-image">        
                    <a href="single-item.html"><img src="img/photos/5.png" alt=""/></a>
                  </div>
                  <div class="rp-details">
                    <!-- Title and para -->
                    <h5><a href="single-item.html">Motorola Droid <span class="price pull-right">$325</span></a></h5>
                    <div class="clearfix"></div>
                    <p>Travel far away to a space station.</p>         
                  </div>                
                </div>        
            </li>
            <li>
                <div class="rp-item"> 
                  <div class="rp-image">        
                    <a href="single-item.html"><img src="img/photos/6.png" alt=""/></a>
                  </div>
                  <div class="rp-details">
                    <!-- Title and para -->
                    <h5><a href="single-item.html">Blackberry Force <span class="price pull-right">$125</span></a></h5>
                    <div class="clearfix"></div>
                    <p>Travel far away to a space station.</p>         
                  </div>                
                </div>        
            </li>
            <li>
                <div class="rp-item"> 
                  <div class="rp-image">        
                    <a href="single-item.html"><img src="img/photos/7.png" alt=""/></a>
                  </div>
                  <div class="rp-details">
                    <!-- Title and para -->
                    <h5><a href="single-item.html">Pantech One <span class="price pull-right">$253</span></a></h5>
                    <div class="clearfix"></div>
                    <p>Travel far away to a space station.</p>         
                  </div>                
                </div>        
            </li>                                                                                               
        </ul>
      </div>
    </div>
  </div>
</div>

<!-- Recent Posts ends -->

<!-- Newsletter starts -->

<div class="container newsletter">
  <div class="row">
    <div class="span12">
      <div class="well">
               <h5><i class="icon-envelope-alt"></i> Hot Offers - Don't Miss Anything!!!</h5>
               <p>Nulla facilisi. Sed justo dui, scelerisque ut consectetur vel, eleifend id erat. Morbi auctor adipiscing tempor. Phasellus condimentum rutrum aliquet.</p>
               <form class="form-inline">
                  <div class="controls controls-row">
                    <input class="span3" type="text" placeholder="Enter your email to Subscribe">
                    <button type="submit" class="btn">Subscribe</button>
                  </div>
               </form>
      </div>
    </div>
  </div>
</div>

<!-- Newsletter ends -->    

<!-- Footer starts -->
<footer>
  <div class="container">
    <div class="row">
      <div class="span12">

            <div class="row">

              <div class="span4">
                <div class="widget">
                  <h5>Contact</h5>
                  <hr />
                    <div class="social">
                      <a href="#"><i class="icon-facebook facebook"></i></a>
                      <a href="#"><i class="icon-twitter twitter"></i></a>
                      <a href="#"><i class="icon-linkedin linkedin"></i></a>
                      <a href="#"><i class="icon-google-plus google-plus"></i></a> 
                    </div>
                  <hr />
                  <i class="icon-home"></i> &nbsp; 123, Some Area. Los Angeles, CA, 54321.
                  <hr />
                  <i class="icon-phone"></i> &nbsp; +239-3823-3434
                  <hr />
                  <i class="icon-envelope-alt"></i> &nbsp; <a href="mailto:#">someone@company.com</a>
                  <hr />
                  <div class="payment-icons">
                    <img src="img/payment/americanexpress.gif" alt="" />
                    <img src="img/payment/visa.gif" alt="" />
                    <img src="img/payment/mastercard.gif" alt="" />
                    <img src="img/payment/discover.gif" alt="" />
                    <img src="img/payment/paypal.gif" alt="" />
                  </div>
                </div>
              </div>

              <div class="span4">
                <div class="widget">
                  <h5>Latest Tweets</h5>
                  <hr />
                    <div class="tweet"></div>
                </div>
              </div>

              <div class="span4">
                <div class="widget">
                  <h5>Links Goes Here</h5>
                  <hr />
                  <div class="two-col">
                    <div class="col-left">
                      <ul>
                        <li><a href="#">Condimentum</a></li>
                        <li><a href="#">Etiam at</a></li>
                        <li><a href="#">Fusce vel</a></li>
                        <li><a href="#">Vivamus</a></li>
                        <li><a href="#">Pellentesque</a></li>
                        <li><a href="#">Vivamus</a></li>
                      </ul>
                    </div>
                    <div class="col-right">
                      <ul>
                        <li><a href="#">Condimentum</a></li>
                        <li><a href="#">Etiam at</a></li>
                        <li><a href="#">Fusce vel</a></li>
                        <li><a href="#">Vivamus</a></li>
                        <li><a href="#">Pellentesque</a></li>
                        <li><a href="#">Vivamus</a></li>
                      </ul>
                    </div>
                    <div class="clearfix"></div>
                  </div>
                </div>
              </div>
              
            </div>

            <hr />
            <!-- Copyright info -->
            <p class="copy">Copyright &copy; 2012 | <a href="#">Your Site</a> - <a href="#">Home</a> | <a href="#">About Us</a> | <a href="#">Service</a> | <a href="#">Contact Us</a></p>
      </div>
    </div>
  <div class="clearfix"></div>
  </div>
</footer>     

<!-- Footer ends -->   */ ?>

<div style="display: none;"><?php echo View::factory('profiler/stats'); ?> </div>

<!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function (d, w, c) {
    (w[c] = w[c] || []).push(function() {
        try {
            w.yaCounter22721344 = new Ya.Metrika({id:22721344,
                    webvisor:true,
                    clickmap:true,
                    trackLinks:true,
                    accurateTrackBounce:true});
        } catch(e) { }
    });

    var n = d.getElementsByTagName("script")[0],
        s = d.createElement("script"),
        f = function () { n.parentNode.insertBefore(s, n); };
    s.type = "text/javascript";
    s.async = true;
    s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";

    if (w.opera == "[object Opera]") {
        d.addEventListener("DOMContentLoaded", f, false);
    } else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>
<noscript><div><img src="//mc.yandex.ru/watch/22721344" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->

<!-- BEGIN JIVOSITE CODE {literal} -->
<script type='text/javascript'>
(function(){ var widget_id = '129452';
var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '//code.jivosite.com/script/widget/'+widget_id; var ss = document.getElementsByTagName('script')[0]; ss.parentNode.insertBefore(s, ss);})();</script>
<!-- {/literal} END JIVOSITE CODE -->

</body>
</html>
